/*    */ package service.Impl;
/*    */ 
/*    */ import dao.Impl.RecruitDAOImpl;
/*    */ import dao.RecruitDAO;
/*    */ import form.RecruitForm;
/*    */ import service.RecruitService;
/*    */ import service.WebSocket;
/*    */ 
/*    */ public class RecruitServiceImpl
/*    */   implements RecruitService {
/* 11 */   private RecruitDAO recruitDAOImpl = new RecruitDAOImpl();
/* 12 */   private WebSocket webSocket = new WebSocket();
/*    */ 
/*    */   
/*    */   public boolean add(RecruitForm recruitForm) {
/* 16 */     if (this.recruitDAOImpl.add(recruitForm)) {
/* 17 */       System.out.println("gennnn:" + recruitForm.getName());
/* 18 */       this.webSocket.sendMessage("有新的同学报名啦~~~【" + recruitForm.getName() + "】");
/* 19 */       return true;
/*    */     } 
/* 21 */     return false;
/*    */   }
/*    */ 
/*    */ 
/*    */   
/* 26 */   public boolean findByIp(String ip) { return this.recruitDAOImpl.findByIp(ip); }
/*    */ }


/* Location:              /Users/frank/Desktop/iotlab/WEB-INF/classes/!/service/Impl/RecruitServiceImpl.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */